/**
 * 表单基础类
 * @author werts
 */
export class FormsElementsBase<T> {
    value: T;
    key: string;
    label: string;
    order: number;
    noLabel: boolean;
    required: boolean;
    controlType: string;

    constructor(options: {
        value?: T,
        key?: string,
        label?: string,
        order?: number,
        noLabel?: boolean,
        required?: boolean,
        controlType?: string
    } = {}) {
        this.value = options.value;
        this.key = options.key;
        this.label = options.label;
        this.noLabel = options.noLabel || false;
        this.order = options.order || 0;
        this.required = options.required;
        this.controlType = options.controlType || 'text';
    }
}